package com.zq.myapp;

import android.app.Application;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;

public class MyApplication extends Application {

    public static RequestQueue queues;

    @Override
    public void onCreate() {
        super.onCreate();
        //使用Application的全局上下文
        queues = Volley.newRequestQueue(getApplicationContext());
    }

    /**
     * 建立http请求队列
     * @return
     */
    public static RequestQueue getHttpQueues(){
        return queues;
    }

}
